home *** CD-ROM | disk | FTP | other *** search
- Time: 10:36:56 am
- Uemail
-
- Uemail is an emacs-like full-screen editor for the Atari-ST computer
- equipped with a color monitor. It supports all of the major commands
- offered by microEmacs version 30, plus some extensions that make its
- interface closer to that used by GNU_EMACS. In fact, uemail is designed to
- work in tandem with GNU_EMACS on a remote computer. When the program is
- connected to the serial line, all of the function keys and the number pad
- keys send the same commands as they do from within uemail, and the defined
- keyboard macros (macros triggered by the accent grave key) are also sent
- accross the line. This allows you to set up special function key definition
- files and macro definition files to use with a remote emacs. In addition
- to the emacs editing commands, uemail has a complete terminal connect mode
- which supports kermit protocol for 7-bit transfers between two computers.
- This ability allows the editor to work with text from a remote system and
- to transfer it back to that system when done. For remotes that do not
- support the kermit protocol there are log and transfer commands which use
- the ST's flow control (settable from within the terminal mode) to transfer
- text without dropping characters (provided that the remote supports one of
- the ST's handshaking protocols). For those who do not use the EMULATOR.ACC
- desk accessory, uemail will set the baud rate while in connect mode. At
- the beginning of the connect session, the baud rate defaults to 1200 bps,
- but it can be reset to 300, 9600, or 19200 bps. When uemail exits from
- terminal mode, it saves the terminal screen. When it returns to terminal
- mode, it rewrites that screen placing the cursor at its previous position.
-
- For the text editor programmer, uemail has a built-in write macro command
- which translates uemail keyboard macros into C source code, allowing quick
- prototyping of new functions to be added to the program. Additional macro
- commands store, save, and recover keyboard macros in their keycode form,
- allowing the user to design macro files by simply recording keystrokes for
- functions. For programmers uemail provides a basic `cc' command designed
- to drive the Alcyon C compiler and the DRI linker/loader. The files
- shell.c and emcc.c contain the code for cc and for the shell command, which
- let you run TOS applications from within the editor. The cc command expects
- for drive M: to be a temporary ram disk and drive E: to contain source.
- These assumptions are hardwired into the source. However, if the file
- cc.ini exists on the default drive when uemail starts up, the program will
- read that file and install its values for the source, include, temporary,
- symbols, and compiler directories. Alternatively, the user can load a
- command file after the editor has started. The following is a sample
- cc.ini file:
-
- /* cc.ini file for cc.ttp and uemail.ttp */
- source=e:\ /* C, lnk, and 68K files */
- include=d:\stdlib.h\ /* headers */
- temp=m:\ /* temporary files, o files, and final prg */
- symb=c:\bin\ /* as68symb.dat */
- bin=c:\bin\ /* compilers, assembler, linker, and loader */
- tdrive=m /* temp drive drive designation */
- home=c:\uemail\ /* where it all began */
- root=c:\ /* boot directory */
- assembly=d:\assembly.s\ /* assembly sources */
- etc=c:\util\ /* utility programs */
- comm=c:\comm\ /* communications */
- shell=c:\util\pcommand.prg /* shell program */
- syslib=c:\bin\ /* library directory */
- lnkfile=xemacs /* filename of link command file */
- float= /* flag for floating point -f, -e or nil*/
- dolink=1 /* if 1, call linker after compiling file[s] */
- delete=1 /* delete I, S, 68K files? 1==YES */
- /* function key bindings for uemail.ttp */
- F1=setmark /* sets the mark */
- F2=listbuffers /* lists current buffers */
- F3=filename /* change current filename */
- F4=writeregion /* write text between point and mark to file */
- F5=fileinsert /* insert file at point */
- F6=fileread /* read file into current buffer */
- F7=filevisit /* visit (find) a file */
- F8=filewrite /* write out buffer to named file */
- F9=filesave /* save current buffer if changed */
- F10=quickexit /* save all changed buffers and exit */
- /* Number pad bindings for uemail.ttp */
- N(=backword /* backward word */
- N)=forwword /* forward word */
- N/=grtw /* globally remove trailing whitespace */
- N*=retversion /* return current version to message line */
- N7=gotobol /* goto beginning of line */
- N8=gotoeol /* goto end of line */
- N9=unkncom /* unknown command */
- N-=pageback /* back by one text page (60 lines default) */
- N4=backsent /* goto beginning of sentence */
- N5=forwsent /* goto end of sentence */
- N6=unkncom /* unknown */
- N+=pageforw /* forward by one text page */
- N1=gotbop /* goto beginning of paragraph (blank line) */
- N2=goteop /* goto end of paragraph (blank line) */
- N3=unkncom /* unknown */
- N.=forwdel /* delete character under cursor */
- NENTER=indent /* newline and indent */
-
- The cc.ini file is read at startup, but the values can be changed after
- initialization using the commfil command (CTLX-CTRL-E). Each line must be
- formatted as above. The word before the equal sign is the `alias' name
- used by the program, and the line to the left of the equal sign is the
- actual path name assigned to the aliased variable. There can be no
- embedded blanks or tabs in a name or alias, but comments may appear on any
- line as long as there is at least one space or tab character between the
- end of the path and the beginning of the comment. No special comment
- characters are necessary although using standard comment markers like those
- above help to make the comments more readable. The order of definitions is
- unimportant, and blank or extra lines are ignored as are aliasses for which
- there are no internal matches to be found (this is what allows both the
- cc.prg and uemail to use the same startup file without problems).
-
- Typing `cc' after issuing the shell command (CTRL-C) and the filename at
- the command line prompt invokes the compiler. To compile the file
- e:test.c, you simply type test at the command line prompt. The output file
- will be on drive M:. If the variable dolink equals 1, then the linker will
- be loaded and told to get its command from the file defined by linkfile.
- (The linkfile must be on the source directory and must have an .LNK extent;
- additionally, because the link68 program cannot handle filenames longer
- than 13 letters, including the path and drive, your filename plus source
- directory should be no more than 9 characters long.)
-
- The set path command and all the file commands also use the alias table. If
- at the command's prompt you type a line which begins with a `~', these
- commands look up the word after the ~ and test it against the known
- aliases. If the word match matches a known alias, the string associated
- with that alias is copied into the filename. Thus if "temp=c:\files\temp"
- is in the cc.ini file at startup, typing the read file command ^X^R and
- asking for the file ~temp\test.i will read in the file c:\files\temp\test.i
- (note that the `\' character is necessary, and the `~' must be the first
- character on the line).
-
- Uemail also supports writers. In addition to the useful macro function,
- uemail provides sentence, paragraph, and page movement commands. It
- provides two punctuation movement commands, forward to next punctation and
- backward to previous puntuation, useful for moving to the next comma or
- quotation mark in a text. Uemail extends the usual microemacs on-screen
- editing features, adding an indent column with the ability to define an
- indent prefix. Unlike other versions of microemacs, uemail's fill
- paragraph command leaves the cursor inside the paragraph in the same spot
- where it was when the command was issued. There are line-based commands for
- formatting texts. The flushleft, flushright, center, transpose words, and
- globally delete trailing whitespace all deal with text appearance. The
- indent subsequent newline same as this lets you open a line underneath the
- present line with the same indentation without having to be at the end of
- the present line. The drop line and indent command works similarly but
- inserts the new line above the present line. Both of these functions are
- not only useful for formatting text, but also for indenting program code.
-
- Uemail provides a rudimentary interface for a spelling checker. If your
- spelling checker uses the standard spell correction mark (0x93), the
- program will search for that character in your file when you type the go
- spell command (CTLX-S), placing your cursor at the beginning of the word to
- correct. The program has a word count function which reports the average
- size of words in a buffer. This function reports the length of your buffer
- in letters and characters. It uses the letter total to determine averages.
- This leads to a more accurate average than methods which divide the total
- number of characters in a buffer by the total number of words.
-
- Uemail can print buffers with page numbers, two header lines, and single or
- double spacing. The page size is settable, and the internal code
- automatically sets up any Diablo/Xerox compatible printer for standard 12
- pitch type. The program can print while editing (as long as there is
- keyboard activity), and if you try to exit while printing, uemail will ask
- whether you want to exit for sure.
-
- Unlike most microEmacsen, uemail follows the GNU_EMACS convention of
- writing all `dirty' buffers when exitting. If a normal exit is chosen
- (CTLX-CTRL-C) and no argument is given, the program asks the user whether
- individual modified files should be saved. The quick exit command (CTRL-Z)
- saves every modified buffer without asking. The ST is prone to BUS and
- address errors, uemail tries to protect the user from these by intercepting
- the vectors associated with these exceptions. When the code signals an
- error, the program gives you the opportunity to save your files before
- restoring the system and exiting. This can avoid a lot of frustration.
-
- The following list of commands is arranged according to category. The
- column marked KEY shows the keystrokes bound to the command. The column
- marked COMMAND gives the internal name of the command that uemail uses.
- And the DESCRIPTION gives a brief explanation of what the command does. In
- the chart, the ^ character in front of a letter means that letter is a
- control character; ESC is the escape key, and ` is the accent grave. Any
- ESC sequence that uses a simple alphabetic key as the second argument is
- reachable using the ALT key while typing the alpha key. For example both
- ESC-F and ALT-F move forward one word. The difference between the two
- options is that the ESC version requires typing two keys, while the ALT
- version requires one "shifted" keystroke. Some of the commands below react
- differently depending upon whether the function is passed a numeric
- argument. Numeric arguments are used most often to cause commands to
- repeat a set number of times. There are two ways to signify an argument to
- a function. Each method requires typing a repeat command before typing the
- function. The two repeat commands are CTRL-U and the ESC key followed by
- any digit or by the negative sign. CTRL-U is called the universal prefix
- and always defaults to four repeats. Typing CTRL-U repeatedly multiplies
- the repeat count. The count echos to the message line. Typing ESC
- followed by a number does essentially the same thing but allows you to
- choose the number directly. For example: ESC-2 followed by CTRL-K deletes
- two full lines forward, which is equivalent to deleting a line and the
- trailing newline. Some commands look for zero arguments to change their
- normal actions. For example: CTLX-D is the set path command; however, when
- it is prefaced with ESC-0 or CTRL-U-0, it returns the current default drive
- and path to the message line. The showtime command is similar. If it is
- called normally, without an argument, or if it is called with a zero or
- negative argument, it writes the current time to the message line. If it
- is called with a possitive argument less than 1000 (a special case), it
- writes the time into the document at the current position. The 1000 value
- is used by the kermit section to write to the message line. Since the
- kermit section must use a different message writing scheme from that used
- by the editor.
-
- Commands for Uemail
- ===================
- KEY (lower case OK) COMMAND DESCRIPTION
- --------------------------------------------------------------------------
- MISCELLANEOUS UTILITIES
- ESC-~ clearflag(); /* Clear changed buffer flag */
- ^X-~ or ^C shell(); /* run a child process or cc */
- ^Q quote(); /* Insert literal */
- ^G ctrlg(); /* Abort out of things */
- ^X-^C quit(); /* Quit prompt to save files */
- ^Z quickexit(); /* low keystroke style exit and save.*/
- ^X-= showcpos(); /* Show the cursor position */
- ^X-W wc(); /* word and line count of buffer */
- ^X-* retversion(); /* version date */
- ^X-M setmode(); /* set a mode for a buffer */
- ^X-^T showtime(); /* tell the time or insert in buffer */
- ESC-M sglmode(); /* set global mode */
- ESC-X mdoncom(); /* do named command */
- ESC-@ rettpa(); /* show available memory and usage */
- ESC-^N enumerate(); /* start or incr. counter variable */
- Lots-o-keys unkncom(); /* unknown command BEEP */
-
- FILE OPERATIONS
- ^X-^E commfill(); /* Read a cc.ini command file */
- ^X-I fileinsert(); /* Insert existing file at point*/
- ^X-^R fileread(); /* Get a file, into existing buf*/
- ^X-^V filevisit(); /* Get a file, new buffer */
- ^X-^W filewrite(); /* Write a file */
- ^X-^S filesave(); /* Save current file */
- ^X-^F filename(); /* Change file name */
- ^X-D setpath(); /* set path if arg=0 get path */
-
- CURSOR MOVEMENT
- ^A gotobol(); /* Move to start of line or prev*/
- ^E gotoeol(); /* Move to end of line or next */
- ^B backchar(); /* Move backward by characters */
- ^F forwchar(); /* Move forward by characters */
- ^P backline(); /* Move backward by lines */
- ^N forwline(); /* Move forward by lines */
- ESC-V backpage(); /* Move backward by screens */
- ^V forwpage(); /* Move forward by screens */
- ESC-B or ESC-^B backword(); /* Backup by words */
- ESC-F or ESC-^F forwword(); /* Advance by words */
- ESC-N goteop(); /* goto end of paragraph */
- ESC-P gotbop(); /* goto beginning of paragraph */
- ^X-< btopunct(); /* move backward to last punctuation */
- ^X-> ftopunct(); /* move forward to next punctuation */
- ESC-A backsent(); /* backward to beginning of sentence */
- ESC-E forwsent(); /* forward to end of sentence */
- ESC-, or ESC-< gotobob(); /* Move to start of buffer */
- ESC-. or ESC-> gotoeob(); /* Move to end of buffer */
- ESC-G goline(); /* goto line in text (use arg) */
- ^@ or ESC-SP setmark(); /* Set mark */
- ^X-^X swapmark(); /* Swap "." and mark */
-
- DOCUMENT FORMATTING
- ^X-# setpage(); /* set page size from arg */
- ^X-! paginate(); /* insert '\f' every page */
- ^X-+ pageforw(); /* move forward set page length */
- ^X-- (dash) pageback(); /* move back set page length */
- ^X-TAB print(); /* print buffer with heading */
- ^X-F setfillcol(); /* Set fill column. */
- ESC-Q fillpar(); /* fill paragraph to fill column */
- ^X-. setindcol(); /* Set indent column or prefix */
- ^T twiddle(); /* Twiddle characters */
- ESC-T twaddle(); /* transpaose two words in place */
- TAB tab(); /* Insert tab */
- RETURN newline(); /* Insert CR-LF */
- ^J indent(); /* Insert CR-LF, then indent */
- ^O openline(); /* Open up a blank line */
- ^X-^O deblank(); /* Delete blank lines */
- ESC-O mdropln(); /* drop current line and move up*/
- ESC-J mindnl(); /* indent subsequent NL same as this */
- ESC-\ mdelind(); /* delete beginning line indentation */
- ESC-^R mrflush(); /* flush right current line */
- ESC-^C mcenter(); /* center current line */
- ^X-\ grtw(); /* remove trailing white space */
- ESC-^O clowsp(); /* close up intervening white space */
- ESC-^P tglcase(); /* toggle case of letter at point */
-
- BUFFERS AND WINDOWS
- ^X-^B listbuffers(); /* Display list of buffers */
- ^X-B usebuffer(); /* Switch a window to a buffer */
- ^X-K killbuffer(); /* Make a buffer go away. */
- ESC-! reposition(); /* Reposition window */
- ^L refresh(); /* Refresh the screen */
- ^X-^N mvdnwind(); /* Scroll window down */
- ^X-^P mvupwind(); /* Scroll window up */
- ^X-N nextwind(); /* Move to the next window */
- ^X-P or ^X-O prevwind(); /* Move to the previous window */
- ^X-1 onlywind(); /* Make current window only one */
- ^X-2 splitwind(); /* Split current window */
- ^X-Z enlargewind(); /* Enlarge display window. */
- ^X-^Z shrinkwind(); /* Shrink window. */
-
- DELETION AND REGIONS
- ESC-H markpar(); /* mark paragraph sets mark */
- ^D forwdel(); /* Forward delete */
- DEL backdel(); /* Backward delete */
- ESC-TAB kill(); /* Kill line forward */
- ^Y yank(); /* Yank back from killbuffer. */
- ESC-U upperword(); /* Upper case word. */
- ESC-L lowerword(); /* Lower case word. */
- ^X-^L upperregion(); /* Upper case region. */
- ^X-^U lowerregion(); /* Lower case region. */
- ESC-C capword(); /* Initial capitalize word. */
- ESC-D delfword(); /* Delete forward word. */
- ESC-DEL delbword(); /* Delete backward word. */
- ^K mdeleln(); /* delete entire line from beginning */
- ESC-^K mdelwln(); /* delete entire line including NL */
- ESC-K killsent(); /* kill sentence forward sets mark */
- ^W killregion(); /* Kill region. */
- ESC-W copyregion(); /* Copy region to kill buffer. */
- ^X-R writereg(); /* write defined region to file */
-
- SEARCHING
- ^S forwsearch(); /* Search forward */
- ^R backsearch(); /* Search backwards */
- ESC-R replace(); /* Search and replace */
- `^R or ESC-^T backisearch(); /* Incremental search back */
- `^S or ESC-^S forwisearch(); /* Incremental search forward */
- ^X-S gospell(); /* Search for 0x93 (unix spell) */
-
- Function Key, Cursor Pad, and Numeric pad bindings. The keycode associated
- with the primary EMACS binding for each of the rebound functions is sent
- over the serial line. This allows you to set up your bindings at the ST to
- match those you normally use with the EMACS on a remote computer.
-
- KEY FUNCTION
- ===========================
- F1 setmark()
- F2 listbuffers()
- F3 filename()
- F4 writeregion()
- F5 fileinsert()
- F6 fileread()
- F7 filevisit()
- F8 filewrite()
- F9 filesave()
- F10 quickexit()
- Number pad (bound to functions except when CapsLock is on)
- ( backword()
- ) forwword()
- / grtw()
- * retversion()
- 7 gotobol()
- 8 gotoeol()
- - pageback()
- 4 backsent()
- 5 forwsent()
- + pageforw()
- 1 gotbop() /* beginning of paragraph */
- 2 goteop() /* end of paragraph */
- 0 Control-X prefix
- . forwdel()
- ENTER indent()
- [All of the other number pad keys are bound to unkncom() (the unknown
- command function), but those can be rebound to something useful through a
- command file.]
- [The cursor pad cannot be rebound. It would not be that difficult to add
- this feature to the source.]
- CURSORS what they look like they should do
- INSERT openline()
- UNDO yank()
- HELP kermit() showhelp() in terminal mode
- CLR refresh()
-
- KERMIT (and subcommands)
- ^_ or HELP kermit(); /* file transfer */
- ________________
- | [The following subcommands are supported. Only the first letter is
- | significant.]
- | send send a file (in a uemail buffer) to remote kermit
- | receive receive a file from remote
- | put send a file in server mode
- | get recieve in server mode (uemail prompts for remote name)
- | finish finish remote kermit server mode
- | bye finish server and logoff remote
- | transfer send a uemail buffer to remote appending EOF to end
- | emacs same as above but without EOF
- | log copy remote session into a uemail buffer (`^\ turns it off)
- | connect connect to the RS232 line in terminal mode
- | ^G abort a kermit session (get, put, rec, send, fin, or bye)
- | Use this if one of the commands appears to "lock up"
- ================
- | [Terminal mode commands. Some are VAX specific.]
- | ALT-CTRL-B send break
- | ALT-B set baud rate (prompts for value)
- | ALT-O turn off handshaking
- | ALT-R use RTS/CTS handshaking
- | ALT-T show time on mode line
- | ALT-X use XON/XOFF handshaking
- | ALT-? show help information
- | HELP show help information
- | ALT-UNDO exit terminal mode (return to current uemail buffer)
- | ALT-any-other sends the character (i.e. NULL)
- ----------------
-
- MACROS
- ======
- ^X-( ctlxlp(); /* Begin macro */
- ^X-) ctlxrp(); /* End macro */
- ^X-E ctlxe(); /* Execute macro */
- ________________
- | The following commands let you bind a macro that was defined using
- | ^X( to any keyboard key. That macro can be executed using the accent
- | grave (putmacro) command. The macros can be saved to disk and reloaded
- | when needed.]
- ----------------
- ` (grave) putmacro(); /* print line macros in text */
- ^X` getmacro(); /* bind current kbdm to key */
- [The following macros are predefined and cannot be rebound.]
- `^G abort
- `^L load a file of previously defined macros
- `^M write currently defined macros to file
- `^R incremental search back
- `^S incremental search forward
- `^T show time on mode line
- `^X write current keyboard macro in C code to
- C-Mac buffer (for programming extensions)
- `^W view C-Mac buffer
- `` insert an accent grave
-